package com.feihao.zhou.demoVolatile;

public class MyThread1 implements Runnable {
    private Money money;

    public MyThread1(Money money) {
        this.money = money;
    }

    @Override
    public void run() {
        /*while (money.getMoney()==10000){

        }*/
        while (true){
            if (money.getMoney()!=10000){
                System.out.println("钱不是10000了");
                break;
            }

        }
    }
}
